package com.bdqn.pojo;

import com.bdqn.pojo.BaseClass;

import java.io.IOException;
import java.io.Serializable;
public final class Person extends BaseClass implements Serializable {
    // 成员变量
    private String name="李";
    static final int age = 30;
    protected String address;
    public String message;

    // 成员方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public final int getAge() {
        return age;
    }

    public String getAddress() {
        return address;
    }

    private void silentMethod() throws IOException, NullPointerException {
        System.out.println("这是悄悄话");
    }

    public Person() {

    }

    public Person(String name) {
        this.name = name;
    }

    protected Person(String name, int age, String address, String message) {
        this.name = name;
        this.address = address;
        this.message = message;
    }

    @Override
    public String toString() {
        return "reflect.entity.Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
